<template>
  <div>
    <button @click="open">打开modal</button>
    <slideModal :visible.sync="isOpen">
      <button @click="open2">
        打开modal2
      </button>
    </slideModal>
    <slideModal :visible.sync="isOpen2">
        我是modal2
    </slideModal>
  </div>
</template>

<script>
  import slideModal from './slideModal.vue'
  export default {
    components: {
      slideModal
    },
    data () {
      return {
        isOpen: false,
        isOpen2: false
      }
    },
    methods: {
      open () {
        this.isOpen = true
      },
      open2 () {
        this.isOpen2 = true
      }
    }
  }
</script>
